package com.donkey.http;

import java.io.IOException;

/**
 * Http 响应状态异常
 */
public class HttpResponseException extends IOException {
    private String url;
    private String method;
    private int statusCode;
    private String reasonPhrase;

    public HttpResponseException(String url, String method, int statusCode, String reasonPhrase) {
        super(statusCode + ":" + reasonPhrase);
        this.url = url;
        this.method = method;
        this.statusCode = statusCode;
        this.reasonPhrase = reasonPhrase;
    }

    public String getUrl() {
        return url;
    }

    public String getMethod() {
        return method;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public String getReasonPhrase() {
        return reasonPhrase;
    }
}
